package http

import (
	"io/ioutil"
	"net/http"
)

type Response struct {
	SpiderName   string
	CallBackName string
	*http.Response
}

func NewResponse(req *Request, goResponse *http.Response) *Response {
	return &Response{
		req.SpiderName,
		req.CallBackName,
		goResponse,
	}
}

func (r *Response) GetContent() ([]byte, error) {
	return ioutil.ReadAll(r.Body)
}
